The bearing device for a wheel has evolved from a structure called first generation in which roller bearings in double rows are independently used to second generation in which a vehicle body attachment flange is integrally provided in an outer member. Further, third generation in which one inner raceway surface of the roller bearings in double rows is integrally formed with an outer circumference of a hub wheel integrally having a wheel attachment flange has been developed and fourth generation in which a constant-velocity universal joint is integrated with the hub wheel and the other inner raceway surface of the roller bearings in double rows is integrally formed with an outer circumference of an outer joint member configuring the constant-velocity universal joint has been developed.
For example, the bearing device for a wheel called third generation is described in Patent Document 1. The bearing device for a wheel called third generation includes, as illustrated in FIG. 39, a hub wheel 152 having a flange 151 extending in an outer diameter direction, a constant-velocity universal joint 154 having an outer joint member 153 fixed to this hub wheel 152, and an outer member 155 disposed on an outer circumferential side of the hub wheel 152.
The constant-velocity universal joint 154 includes the outer joint member 153, an inner joint member 158 disposed in a cup-shaped section 157 of this outer joint member 153, a ball 159 disposed between this inner joint member 158 and the outer joint member 153, and a retainer 160 that retains this ball 159. A spline section 161 is formed on an inner circumferential surface of a center hole of the inner joint member 158. An end spline section of a shaft (not shown) is inserted into this center hole, whereby the spline section 161 on the inner joint member 158 side and the spline section on the shaft side are engaged.
The hub wheel 152 has a cylindrical shaft section 163 and the flange 151. A short-cylindrical pilot section 165, on which a wheel and a brake rotor (not shown) are mounted, is protrudingly provided on an outer end surface 164 (end surface on an out board side) of the flange 151. The pilot section 165 includes a large-diameter first section 165a and a small-diameter second section 165b. The brake rotor is externally fit in the first section 165a and the wheel is externally fit in the second section 165b. 
A notch section 166 is provided in an outer circumferential surface at an end on the cup-shaped section 157 side of the shaft section 163. An inner ring 167 is fit in this notch section 166. A first inner raceway surface 168 is provided near a flange on an outer circumferential surface of the shaft section 163 of the hub wheel 152. A second inner raceway surface 169 is provided on an outer circumferential surface of the inner ring 167. A bolt inserting hole 162 is provided in the flange 151 of the hub wheel 152. A hub bolt for fixing the wheel and the brake rotor to this flange 151 is inserted into this bolt inserting hole 162.
In the outer member 155, outer raceway surfaces 170 and 171 in two rows are provided on an inner circumference thereof and the flange (vehicle body attachment flange) 151 is provided on an outer circumference thereof. The first outer raceway surface 170 of the outer member 155 and the first inner raceway surface 168 of the hub wheel 152 are opposed to each other. The second outer raceway surface 171 of the outer member 155 and the raceway surface 169 of the inner ring 167 are opposed to each other. Rolling elements 172 are interposed between the second outer raceway surface 171 and the raceway surface 169.
A stem shaft 173 of the outer joint member 153 is inserted into the shaft section 163 of the hub wheel 152. In the shaft section 173, a screw section 174 is formed at an end of a reverse cup-shaped section thereof. A spline section 175 is formed between this screw section 174 and the cup-shaped section 157. A spline section 176 is formed on an inner circumferential surface (inner diameter surface) of the shaft section 163 of the hub wheel 152. When this stem shaft 173 is inserted into the shaft section 163 of the hub wheel 152, the spline section 175 on the stem shaft 173 side and the spline section 176 on the hub wheel 152 side are engaged.
A nut member 177 is screwed onto the screw section 174 of the stem shaft 173 projecting from the shaft section 163. The hub wheel 152 and the outer joint member 153 are connected. An inner end surface (rear surface) 178 of the nut member 177 and an outer end surface 179 of the shaft section 163 come into contact with each other and an end surface 180 on a shaft section side of the cup-shaped section 157 and an outer end surface 181 of the inner ring 181 come into contact with each other. In other words, when the nut member 177 is tightened, the hub wheel 152 is nipped by the nut member 177 and the cup-shaped section 157 through an intermediation of the inner ring 167.
[Patent Document 1] JP 2004-340311 A